package rkdwogus7.basic;

import java.util.*;

public class Ex72_OOP {

	public static void main(String[] args) {
		// 객체 생성 및 값 다루기
		Ex72_Retangle r= new Ex72_Retangle();
		r = new Ex72_Retangle(4, 40, "red");
		
		System.out.println( r.width );
		System.out.println( r.height );
		System.out.println( r.color );
		System.out.println( r.getArea() );
		System.out.println( r.getCircum() );
		
		Ex73_Fan f = new Ex73_Fan();
		
		System.out.println( f.FAST );
		System.out.println( f.color );
		System.out.println( f.speed );
		System.out.println( f.move );
		
		
		
	} // main

} // class

class Ex72_Retangle {
	double width;
	double height;
	String color;
	
	public Ex72_Retangle() {
		// 생성자 : 객체 생성 및 멤버변수 초기화(기본생성자)
		width = 1.0;
		height = 1.0;
		color = "white";
	}
	
	public Ex72_Retangle( double width, double height, String color ) {
		this.width = width;
		this.height = height;
		this.color = color;
	} // 사용자 정의 생성자
		
		double getArea() {
			double area = width * height;
			return area;
		}
		double getCircum() {
			double circum = 2 * (width + height);
			return circum;
		}
		
		
	
} // Retangle

class Ex73_Fan {
	final String SLOW;
	final String MEDIUM;
	final String FAST;
	String speed;
	String move;
	double radius;
	String color;
	public Ex73_Fan() {
		SLOW = "1";
		MEDIUM = "2";
		FAST = "3";
		speed = "slow";
		move = "on";
		radius = 5.0;
		color = "blue";
	}
	
} // Fan

class Ex74_Account {
	String aid;
	double balance;
	double interestrate;
	String dateCreated;
	double getMonthlyInterRate;
	public Ex74_Account() {
		
	}
} // Account

class Ex75_Stock {
	String sName;
	String clPrice;
	String cuPrice;
	public Ex75_Stock() {
		
	}
	
	
} // Stock











